<template>
    <div class="top-cpn">
        <div>
            <img src="../../assets/logo.png" alt="" />
        </div>
        <div class="top-out" @click="loginOut">退出</div>
    </div>
</template>

<script>
export default {
    methods: {
        loginOut() {
            // this.$store.commit('changeLogin', false);
            // localStorage.removeItem('name');
            localStorage.removeItem('name');
            this.$router.push('/login');
        }
    }
};
</script>

<style lang="scss" scoped>
.top-cpn {
    height: 80px;
    line-height: 80px;
    display: flex;
    justify-content: space-between;
    background: #333333;
    img {
        width: 50px;
        height: 50px;
        margin-top: 15px;
        margin-left: 15px;
    }
    .top-out {
        color: #fff;
        margin-right: 15px;
    }
}
</style>
